package string;

/**
 * String trim()
 * 去除一个字符串两边的空白字符
 */
public class TrimDemo {
    public static void main(String[] args) {
        String line="   w   o   r   l   d       ";
        System.out.println(line);//     w   o   r   l   d
        String trim =line.trim();
        System.out.println(trim);//w    o   r   l   d
    }
}
